function setcookie(key,value,s){
    const t = new Date()
    t.setTime(t.getTime()-1000*60*60*8+1000*s)
    
    if(value instanceof Object){
     value = JSON.stringify(value)
    }
    document.cookie = `${key}=${value}; expires=${t}`
  }


  function  getcookie(key){
    let arr = document.cookie.split("; ")
    let temp1
    arr.forEach((item)=>{
        let temp = item.split("=")
        
        if(key===temp[0]){
            temp1 = temp[1]
        }
    })
    return temp1
  }


 function removecookie(key){
    setcookie(key,null,-1)
 }